<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绝对定位实现多重边框</title>
    <style>
        body {
            background: #000;
        }

        .box {
            margin: 300px auto;
            width: 200px;
            height: 80px;
            position: relative;
            text-align: center;
            line-height: 80px;
            font-weight: bold;
            color: #165F54;
            z-index: 2;
            /* 文字的渐变色 */
            background-image: -webkit-linear-gradient(bottom, gold, deeppink);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            /* 　background:-webkit-linear-gradient(...)为文本元素提供渐变背景。
　　             webkit-text-fill-color:transparent使用透明颜色填充文本。
　　             webkit-background-clip:text用文本剪辑背景，用渐变背景作为颜色填充文本。
            */
        }

        .item {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border: 2px solid #165F54;
        }


        .box .item {
            border-image: linear-gradient(45deg, gold, deeppink) 2;
            animation: move 6s infinite linear;
        }

        @keyframes move {

            0%,
            100% {
                /* clip-path CSS 属性使用裁剪方式创建元素的可显示区域。区域内的部分显示，区域外的隐藏 */
                clip-path: inset(0 0 95% 0);
            }

            25% {
                clip-path: inset(0 95% 0 0);
            }

            50% {
                clip-path: inset(95% 0 0 0);
            }

            75% {
                clip-path: inset(0 0 0 95%);
            }
        }

        .item1 {
            width: 180px;
            height: 80px;
        }

        .item2 {
            width: 190px;
            height: 70px;

        }

        .item3 {
            width: 200px;
            height: 60px;
        }
    </style>
</head>

<body>
    <div class="box">Start
        <div class="item item1"></div>
        <div class="item item2"></div>
        <div class="item item3"></div>
    </div>


</body>

</html>